]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
sessionMode: Add hasAppMenu property
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 16 May 2012 23:12:39 +0000 (01:12 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 22 May 2012 17:42:28 +0000 (19:42 +0200)
Add a sessionMode.hasAppMenu property, which determines whether
the top bar should contain a menu for the active application or
not.

https://bugzilla.gnome.org/show_bug.cgi?id=676156

js/ui/panel.js
js/ui/sessionMode.js

index 45aabb218356afb9ee13841897b3b229015ac093..eb3a9e793e43311af5987aaa4502930049a28096 100644 (file)
@@ -972,7 +972,7 @@ const Panel = new Lang.Class({
             this._menus.addMenu(this._activitiesButton.menu);
         }
 
-        if (Main.sessionMode.sessionType == Shell.SessionType.USER) {
+        if (Main.sessionMode.hasAppMenu) {
             this._appMenu = new AppMenuButton(this._menus);
             this._leftBox.add(this._appMenu.actor);
         }
index 3ab89c18266c158450278f86e0aca114b3a65eaf..3e05400b9f05afe3f837004b120cc6b60d55a180 100644 (file)
@@ -9,9 +9,11 @@ const DEFAULT_MODE = 'user';
 
 const _modes = {
     'gdm': { hasOverview: false,
+             hasAppMenu: false,
              sessionType: Shell.SessionType.GDM },
 
     'user': { hasOverview: true,
+              hasAppMenu: true,
               sessionType: Shell.SessionType.USER }
 };